<div class="comment add-reply ">
    <ul class="more_reply_box comment_list">
    <#list (scenicReply)! as r>
        <li>
            <a href="#" target="_blank">
                <img src="${r.userHeadUrl}" width="16" height="16">${r.username}
            </a>
            <#if r.parentReply??>
                回复 ${(r.parentReply.username)!}
            </#if>
            ：${r.content}
            <a href="javascript:void(0);" class="_j_reply re_reply _lhp_add_subr_btn${r.id}" data-rid="${r.id}"
               data-uid="${r.userId}"
               data-username="${r.username}" title="添加回复" onclick="showSubReplyTextarea${r.id}();">回复</a>
            <br><span class="time">${r.createTime?string('yyyy-MM-dd HH:ss')}</span>
        </li>
    <#--回复框-->
        <script>
            showSubReplyTextarea${r.id} = function () {
                $("._lhp_add_subreply${r.id}").removeClass("hide");
            };
            retractSubTextarea${r.id} = function () {
                $("._lhp_add_subreply${r.id}").removeClass("hide").addClass("hide");
            };
            addSubReply${r.id} = function () {
                var scenicId = $("._lhp_sub_reply${r.id}").data('scenic_id');
                var scenicName = $("._lhp_sub_reply${r.id}").data('scenic_name');
                var commentId = $("._lhp_sub_reply${r.id}").data('comment_id');
                var commentUserId = $("._lhp_sub_reply${r.id}").data('comment_user_id');
                var commentUsername = $("._lhp_sub_reply${r.id}").data('comment_username');
                var content = $("._lhp_sub_reply${r.id}").val();
                var parentReplyId = $("._lhp_sub_reply${r.id}").data('parent_id');
                if (!content) {
                    popup("评论内容必填");
                    return;
                }
                $("._lhp_comment_reply${r.id}").val('');
                $.post("/scenic/replyAdd", {
                    scenicId: scenicId,
                    scenicName: scenicName,
                    commentId: commentId,
                    commentUserId: commentUserId,
                    commentUsername: commentUsername,
                    parentReplyId:parentReplyId,
                    content:content},function (data) {
                    if (data.success) {
                        //修改评论数
                        $(".replay_num").html(data.data);

                        $("#currentPage").val(1);
                        $("#replyForm${r.commentId}").submit();  //重新查一次回复
                    }
                })
            }
        </script>

        <div class="add-comment reply-form hide _lhp_add_subreply${r.id}">
                        <textarea class="comment_reply _lhp_sub_reply${r.id}" data-comment_id="${(r.commentId)!}"
                                  data-comment_username="${(r.commentUsername)!}"
                                  data-comment_user_id="${(r.commentUserId)!}"
                                  data-scenic_id="${(r.scenicId)!}" data-scenic_name="${(r.scenicName)!}"
                                  data-parent_id="${r.id}"
                                  style="overflow: hidden; color: rgb(204, 204, 204);"
                                  onblur="retractSubTextarea${r.id}();"></textarea>
            <a class="btn btn_submit_reply" href="javascript:void(0);" onclick="addSubReply${r.id}();">回复</a>
        </div>


    </#list>
    </ul>


</div>